<?php
/**
 * 视图控制器
 */
namespace app\manage\controller\agent;

use app\manage\controller\Base;

class Show extends Base
{
    public function index(){
        $params = $this->request->get();

        // 筛选参数
        $whereFields = ['mid','page'];
        $where=[];
        foreach($whereFields as $v):
            if(isset($params[$v]))
                $where[$v] = $params[$v];
        endforeach;
        // 删选参数转成字符串
        $whereStr = arrayToQueryString($where);
        $whereStr = ltrim($whereStr,'&');

        // 页码
        $page = isset($where['page'])?$where['page']:1;
        if(!$page)
            $page = 1;
        
        // 页面信息
        $pageData = ['title'=>'代理中心管理'];

        $this->assign('pageData',$pageData);
        $this->assign('page',$page);
        $this->assign('whereStr',$whereStr);
        
        return view();
    }

}